/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.flexengine.math;

/**
 * @author Luann R. Athayde
 * @version 1.0
 * @since 1.0
 */
public class Cube extends Form3D {
    
    private float size;

    public Cube() {
        this("Cube", 0f, 0f, 0f, 0f);
    }

    public Cube(String nome) {
        this(nome, 0f, 0f, 0f, 0f);
    }

    public Cube(String name, float x, float y, float z, float size) {
        super(name, x, y, z);
        this.size = size;
    }

    public float getSize() {
        return size;
    }

    public void setSize(float size) {
        this.size = size;
    }
    
    @Override
    public float getArea() {
        return 6f * (size*size);
    }
    
    @Override
    public float getVolume() {
        return (size * size * size);
    }

    @Override
    public String toString() {
        return getName()+"{" + "x=" + getX() + ", y=" + getY() + ", z=" + getZ() + ", size=" + size + '}';
    }
    
}
